package com.tedu.springdemo.day01;

import org.springframework.beans.factory.FactoryBean;

    public class NetConSpringFactory implements FactoryBean<NetConnection>{

        public NetConnection getObject() throws Exception {
            NetConnection nc=new NetConnection();
            nc.load();nc.ping();nc.conn();
            return nc;
        }


        public Class<?> getObjectType() {
            return NetConnection.class;
        }


        public boolean isSingleton() {
            return true;
        }
    }

